//=============================================================================
//
//   Copyright (C) 2020 All rights reserved.
//
//   Filename:		mod.rs
//
//   Author: Wang Zhecheng - wangzhecheng@yeah.net
//
//   Date: 2020-10-27 19:06
//
//   Last Editors: Wang Zhecheng - wangzhecheng@yeah.net
//
//   Last modified:	2020-11-06 18:27
//
//   Description:
//
//=============================================================================
pub mod time_phase;
pub mod time_step;

use crate::Real;

pub trait StepLike: std::fmt::Display {
    fn get_stime(&self) -> Real;
    fn get_etime(&self) -> Real;
    fn set_stime(&mut self, rhs: Real);
    fn set_etime(&mut self, rhs: Real);

    // --------------------------
    #[inline]
    fn get_dtime(&self) -> Real {
        (self.get_etime() - self.get_stime()).abs()
    }
}
